/**
 * @param {number[]} nums
 * @param {number} k
 * @return {void} Do not return anything, modify nums in-place instead.
 * @description 调用api 会超时
 */

var rotate = function (nums, k) {
    while (k > 0) {
        nums.unshift(nums.pop())
        k--
    }
    return nums
};
